<%@include file="_header.jsp"%>

<title>32Learn</title>
</head>
<body>
    <c:choose>
        <c:when test="${userLevel != 2 && userLevel != 3}">
            <%@include file="errorPage.jsp"%>
        </c:when><c:otherwise>
            <%@include file="_menu.jsp"%>

            <div class="sidebar">

                <div class="redbar"><a href="#"><div id="bar-textcontent">${inhoud.courseList}</div></a>
                </div>
                <div id="sidescreen">

                    <ul class="thumbnails">
                        <li class="span4">
                            <div class="thumbnail">
                                <h3>${inhoud.subscribeTeacherT}</h3>
                                <img src="icons/view_courses.png" alt="">

                                <p> ${inhoud.subscribeTeacherT2}</p>
                            </div>
                        </li>
                    </ul>


                </div>



            </div>

            <div class="wrappermain">


                <div class="digitalclass">
                    <div id="subheader"> <div id="bar-textcontent">${inhoud.courseList}</div> </div>






                    <div class="main-digital">
                        <table class="table" >

                            <c:choose>
                                <c:when test="${gebruikersLijst != null}">
                                    <tr>
                                        <td>${inhoud.username}</td>
                                        <td>${inhoud.name}</td>
                                    </tr>                                      
                                   <c:forEach var="gebruiker" items="${gebruikersLijst}">                                     
                                        <tr>
                                            <td>
                                                ${gebruiker.voornaam}
                                            </td>

                                            <td>
                                                ${gebruiker.voornaam} ${gebruiker.achternaam}
                                            </td>

                                            <td>
                                                <a href="subscribe_course_teacher?userid=${gebruiker.ID}"><img src="icons/subscribe_v2.png"></a>
                                            </td>
                                        </tr>
                                    </c:forEach>                                    
                                    
                                </c:when>
                                <c:when test="${subscribecourses != null}">
                                    <tr>
                                        <td>${inhoud.changeCourseT}</td>
                                        <td>${inhoud.changeCourseT3}</td>
                                    </tr>
                                    <c:forEach var="courseinfo" items="${subscribecourses}">
                                            <c:set var="course" value="${courseinfo}" />

                                            <tr>
                                                <td>
                                                    ${courseinfo.courseName}
                                                </td>

                                                <td>
                                                    ${courseinfo.courseLanguage}
                                                </td>

                                                <td>
                                                    <a href="subscribe_course_teacher?courseid=${courseinfo.courseID}&userid=${userId}"><img src="icons/subscribe_v2.png"></a>
                                                </td>
                                            </tr>
                                    </c:forEach>
                                </c:when>
                                <c:otherwise>
                                    ${inhoud.subscribeTeacherT3}
                                </c:otherwise>
                            </c:choose>

                        </table>


                    </div>
                </div>
            </div>
        </c:otherwise></c:choose>
</body>
</html>
